#include "CApp.h"
 
bool CApp::OnInit() {
    if(SDL_Init(SDL_INIT_EVERYTHING) < 0) {
        return false;
    }
 
    if((Surf_Display = SDL_SetVideoMode(WWIDTH, WHEIGHT, 32, SDL_HWSURFACE | SDL_DOUBLEBUF)) == NULL) {
        return false;
    }
 
    if((Surf_Test = CSurface::OnLoad("..\\SDL_Tutorial\\Images\\yoshi.bmp")) == NULL) {
        return false;
    }

	if(Entity1.OnLoad("..\\SDL_Tutorial\\Images\\yoshi.bmp", 64, 64, 8) == false) {
    return false;
	}
 
	if(Entity2.OnLoad("..\\SDL_Tutorial\\Images\\yoshi.bmp", 64, 64, 8) == false) {
    return false;
	}
 
	Entity2.Y = 64;
 
	CEntity::EntityList.push_back(&Entity1);
	CEntity::EntityList.push_back(&Entity2);


 
    return true;
}